import React from 'react';
import {View, Text, StyleSheet, Dimensions} from 'react-native';
import {Icon} from 'react-native-elements';
import {
  screenHeight,
  screenWidth,
  navBarHeight,
  statusHeight,
} from '../../style';

export default function Empty(props) {
  const {text = '暂无数据', style = {}} = props;
  return (
    <View style={[styles.container, style]}>
      <Icon
        name="calendar-times"
        size={78}
        type="font-awesome-5"
        color={'#999'}
      />
      <View style={styles.textWrapper}>
        <Text style={styles.text}>{text}</Text>
      </View>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    width: screenWidth,
    height: screenHeight - navBarHeight - statusHeight,
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center',
  },
  textWrapper: {
    marginTop: 26,
  },
  text: {
    fontSize: 16,
    color: '#999',
  },
});
